package com.dao.auth;



import java.util.List;

import com.common.base.BaseSqlMapDAO;
import com.model.auth.Tie;

public class TieDao extends BaseSqlMapDAO{

	   public boolean insertTie(Tie tie) throws Exception{
		return this.getSqlMapClientTemplate().insert("mtie.insertTie", tie)!=null;
	   }
	   
	   public boolean updateTie(Tie tie) throws Exception{
		return this.getSqlMapClientTemplate().update("mtie.updateTie",tie)>0;
	   }
	   
	   public boolean delTieById(int id) throws Exception{
		return this.getSqlMapClientTemplate().delete("mtie.delTieById",id)>0;
	   }
	   
	   public Tie getTieById(Integer id) throws Exception{
		 return (Tie) this.getSqlMapClientTemplate().queryForObject("mtie.getTieById",id);
	   }
	   public List<Tie> getTieInfo(Integer type) throws Exception{
		return this.getSqlMapClientTemplate().queryForList("mtie.getTieInfo",type);		   
	   }
}
